package com.herui.sdyu_lib.blu;

import android.text.TextUtils;

import java.util.UUID;

/**
 * Created by amanda.shan on 2017/5/17.
 */

public class BlueDevice {

    private String blueName;
    private String blueMac;

    private boolean ble;  // 蓝牙4.0设备

    private UUID serviceUuid;
    private UUID readUuid;
    private UUID writeUuid;

    public String getBlueName() {
        return blueName;
    }

    public void setBlueName(String blueName) {
        this.blueName = blueName;
    }

    public String getBlueMac() {
        return blueMac;
    }

    public void setBlueMac(String blueMac) {
        this.blueMac = blueMac;
    }

    public boolean isBle() {
        return ble;
    }

    public void setBle(boolean ble) {
        this.ble = ble;
    }

    public UUID getServiceUuid() {
        return serviceUuid;
    }

    public void setServiceUuid(UUID serviceUuid) {
        this.serviceUuid = serviceUuid;
    }

    public UUID getReadUuid() {
        return readUuid;
    }

    public void setReadUuid(UUID readUuid) {
        this.readUuid = readUuid;
    }

    public UUID getWriteUuid() {
        return writeUuid;
    }

    public void setWriteUuid(UUID writeUuid) {
        this.writeUuid = writeUuid;
    }

    public static boolean nameEqualType(String deviceName, String prefix) {

        if (!TextUtils.isEmpty(deviceName) && deviceName.startsWith(prefix))
            return true;
        else
            return false;
    }

    public int getType(String deviceName) {
        return 0;
    }
}
